extends CanvasLayer

@onready var energy_bar: TextureProgressBar = $EnergyBar

var parent_node: Player

func _ready() -> void:
	parent_node = get_parent()
	energy_bar.value = 1.0

func _on_player_energy_change() -> void:
	energy_bar.value = 1.0 * parent_node.energy / parent_node.max_energy
